package io.wdb.modules.generator.generator.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import io.wdb.modules.generator.generator.entity.BsGroupEntity;
import io.wdb.modules.generator.generator.service.BsGroupService;
import io.wdb.modules.manager.group.dao.BsGroupDao;



@Service("bsGroupService")
public class BsGroupServiceImpl implements BsGroupService {
	@Autowired
	private BsGroupDao bsGroupDao;
	
	@Override
	public BsGroupEntity queryObject(String id){
		return bsGroupDao.queryObject(id);
	}
	
	@Override
	public List<BsGroupEntity> queryList(Map<String, Object> map){
		return bsGroupDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return bsGroupDao.queryTotal(map);
	}
	
	@Override
	public void save(BsGroupEntity bsGroup){
		if(bsGroup.getAvailable()==null) {
			bsGroup.setAvailable(1);
		}
		bsGroupDao.save(bsGroup);
	}
	
	@Override
	public void update(BsGroupEntity bsGroup){
		bsGroupDao.update(bsGroup);
	}
	
	@Override
	public void delete(String id){
		bsGroupDao.delete(id);
	}
	
	@Override
	public void deleteBatch(String[] ids){
		bsGroupDao.deleteBatch(ids);
	}
	
}
